Views from Legacy SQL
In this example, you already have some legacy SQL you can bring into bipp to create a table. You can be selective with the columns you expose. In this case, country is not included in the defined columns.
Select the columns:
bipp generates the SQL:
SELECT t000.invoice_num AS _0, t000.unit_price AS _1
FROM (
SELECT t.invoice_num AS invoice_num,
t.stock_code AS stock_code,
t.unit_price AS unit_price,
t.country AS country
FROM `online_retail`.`stocks` AS s
JOIN `online_retail`.`transactions` AS t
ON s.code = t.stock_code
WHERE s.description like '%TAPE%'
) AS t000
GROUP BY 1, 2
Fetch the data: